﻿<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>后台管理 - 易买网</title>
<link type="text/css" rel="stylesheet" href="../css/style.css" />
<script type="text/javascript" src="../scripts/function-manage.js"></script>
</head>
<body>
<%@include file="nav.jsp"%>
<div id="position" class="wrap">
	您现在的位置：<a href="index.jsp">易买网</a> &gt; 管理后台
</div>
<div id="main" class="wrap">
	<%@include file="left.jsp"%>
	<div class="main">
		<h2>订单管理</h2>
		<div class="manage">
			<div class="search">
				<form method="get" action="OrderList">
					订单号：<input type="text" class="text" name="searchId" />
					订货人：<input type="text" class="text" name="searchName" />
					<label class="ui-blue"><input type="submit" name="submit" value="查询" /></label>
					<label class="ui-blue"><input type="submit" value="重置" src="OrderList" /></label>
				</form>
			</div>
			<div class="spacer"></div>
			<table class="list">
				<tr>
					<th>ID</th>
					<th>姓名</th>
					<th>发货地址</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
				<c:forEach var="order" items="${list}">
					<tr>
						<td class="first w4 c">${order.eo_id}</td>
						<td class="w1 c">${order.eo_user_name}</td>
						<td>${order.eo_user_address}</td>
						 <td class="w1 c">
							 <c:choose>
							 <c:when test="${order.eo_status == 1}">
								待审核
							</c:when>
							<c:when test="${order.eo_status == 2}">
								审核通过
							</c:when>
							<c:when test="${order.eo_status == 3}">
								配货
							</c:when>
							<c:when test="${order.eo_status == 4}">
								配送中
							</c:when>
							<c:when test="${order.eo_status == 5}">
								收货并确认
							</c:when>
							 </c:choose>
						 </td>
						<td class="w1 c"><a href="OrderModify?orderId=${order.eo_id}
						&userName=${order.eo_user_name}&address=${order.eo_user_address}
						&cost=${order.eo_cost}&date=${order.eo_create_time}&status=${order.eo_status}">修改</a>
							<a href="javascript:Delete('OrderDelete?id=${order.eo_id}&pageIndex=${pageIndex}');">删除</a></td>
					</tr>
				</c:forEach>

			</table>
			<div class="pager">
				<ul class="clearfix">
					<c:if test="${pageIndex !=1 && not empty pageIndex}">
						<li><a href="OrderList?pageIndex=1&searchId=${searchId}&searchName=${searchName}">首页</a></li>
						<li><a href="OrderList?pageIndex=${pageIndex-1}&searchId=${searchId}&searchName=${searchName}">上一页</a></li>
					</c:if>

					<li class="current">${pageIndex}/${maxPage}</li>
					<c:if test="${pageIndex != maxPage && not empty pageIndex}">
						<li><a href="OrderList?pageIndex=${pageIndex+1}&searchId=${searchId}&searchName=${searchName}">下一页</a></li>
						<li><a href="OrderList?pageIndex=${maxPage}&searchId=${searchId}&searchName=${searchName}">末页</a></li>
					</c:if>
				</ul>
			</div>
		</div>
	</div>
	<div class="clear"></div>
</div>
<div id="footer">
	Copyright &copy; 2022 卓京教育 All Rights Reserved. 湘ICP证1001号
</div>
</body>
</html>
